package testJdk.lambda.testFunction;

import java.util.function.Function;

/**
 * @version 1.0.0
 * Created by cyd on 2021-12-15 11:55:53
 * @ClassName : learn_jdk.lambda.testFunction.FunctionUtil
 * @Description : 类描述
 */
public class FunctionUtil {
    /**
     * 函数型接口
     *
     * @param str lambda参数
     * @param fun 函数型接口
     * @return lambda的返回值
     */
    public static String strHandle(String str, Function<String, String> fun) {
        return fun.apply(str);
    }

    public static String contactStr(String[] strs, Function<String[], String> fun) {
        return fun.apply(strs);
    }
}
